﻿using Asp.Versioning;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;

namespace Himp.TaskScheduling
{
    [Area(TaskSchedulingRemoteServiceConsts.ModuleName)]
    [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)]
    [Route("api/taskScheduling/paramValue")]
    [ApiVersion("1.0")]
    [ApiController]
    [ControllerName("paramValue")]
    public class ParamConfigValueController : TaskSchedulingController, IParamConfigValueService
    {
        private IParamConfigValueService _paramConfigValueService;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="paramConfigService"></param>
        public ParamConfigValueController(IParamConfigValueService paramConfigValueService)
        {
            _paramConfigValueService = paramConfigValueService;
        }

        [HttpGet]
        [Route("keys")]
        public Task<List<string>> GetKeyListAsync()
        {
            return _paramConfigValueService.GetKeyListAsync();
        }

        [HttpGet]
        public Task<Dictionary<string, object>> GetListAsync([FromQuery] ParamConfigValueInput input)
        {
            return _paramConfigValueService.GetListAsync(input);
        }
    }
}
